1. Field of the Invention
The present invention relates to a data output method for temporarily accumulating received data and performing output based on the accumulated data, a data output apparatus adopting such a data output method, and a computer program product for realizing such a data output apparatus. In particular, the present invention relates to a data output method, a data output apparatus, and a computer program product suitable for real-time communication such as VoIP and streaming distribution.
2. Description of Related Art
In recent years, there is an increasing use of applications that enable real-time communication such as VoIP (Voice over Internet Protocol), VoPN (Voice over Packet Network) and streaming distribution in which voice and/or video data is transmitted and received between apparatuses through a communication network such as an IP network. In particular, IP telephony that is one example of such applications is spread rapidly. In the IP telephony system, by transmitting and receiving voice data in the form of packets through an IP network, communication is realized between an apparatus at the transmitting end of packets and an apparatus at the receiving end of packets. However, in the communication through the IP network, since the arrival delay time required for transferring packets from the apparatus at the transmitting end to the apparatus at the receiving end varies depending on each packet, there is a problem of jitter. The jitter in the arrival delay time is a serious problem for IP telephony that is required to perform real-time and continuous communication. In order to solve such a problem, in the IP telephony system, the apparatus at the receiving end of packets is provided with a buffer called a “jitter buffer”. The apparatus (IP phone set) at the receiving end having the jitter buffer realizes stable voice outputted by temporarily accumulating received packets in the jitter buffer and absorbing the jitter in the arrival delay time before outputting the packets as voice.
When outputting voice using the jitter buffer in such a manner, the larger the accumulation capacity of the jitter buffer for accumulating packets, the greater the ability of absorbing the jitter in the arrival delay time, but there is a problem that the delay from the arrival of a packet to the output of the packet becomes larger. In order to solve such a problem, Japanese Patent Application Laid-Open No. 2003-87317 discloses a method in which an arrival delay time is calculated by measuring the arrival time intervals of packets, and a discard threshold value, namely the accumulation capacity of the jitter buffer is determined based on the jitter in the calculated arrival delay time.
However, the method of measuring the arrival time intervals of packets as disclosed in the Japanese Patent Application Laid-Open No. 2003-87317 has problems that a device for measuring the arrival time is required, and the method depends on the assumption that the data amount transmitted from the transmitting end and the data amount received and reproduced at the receiving end are equal.
Therefore, for example, when the data amount transmitted from the transmitting end in a predetermined period is larger than the data amount reproduced at the receiving end, data reproduction at the receiving end cannot catch up with the transmission of data and the buffer is always in an overflow state, and consequently reproduction delay corresponding to the buffer capacity occurs constantly, namely a constant delay occurs. In this case, even when the data exceeding the buffer capacity is discarded after elapse of a predetermined time, the problem of constant delay mentioned above cannot be solved. In other words, with the prior art, the buffer capacity intended to be used for absorbing the transmission delay jitter is reduced due to the difference between the transmitted data amount and the reproduced data amount, and causes a problem that there is always a reproduction delay corresponding to the buffer capacity, more specifically the time required for reproducing the data amount corresponding to the buffer capacity. In order to solve such a problem, the applicant of the present application in Japan has applied an invention of monitoring the accumulated amount to detecting the occurrence of a constant delay and optimizing the accumulation capacity of the jitter buffer according to the state of the constant delay (Japanese Patent Application Laid-Open No. 2005-136742). In this invention, it is possible to set the accumulation capacity of the jitter buffer to an appropriate value by taking into account the jitter in the arrival delay time and the jitter during reproduction.
Further, in the above-described prior art, when data exceeding the buffer capacity is discarded, there arises a problem that sound interruption occurs due to shortage of data. This problem also occurs in the above-mentioned Japanese Patent Application Laid-Open No. 2005-136742 because when the constant delay is detected, the upper accumulation limit of the jitter buffer is always decreased irrespective of the details of the past data accumulation, and therefore the frequency that the accumulated amount of data exceeds the upper accumulation limit of the jitter buffer by the subsequent reception of data increases. As a result, the frequency of discarding the data exceeding the upper accumulation limit increases, and sound interruption tends to occur.